@extends("admin.index")

@section("title","系统配置")

@section("content")

    <div class="page-inner">
        <div class="page-header">
            <nav class="breadcrumb">
                <div class="left row">
                    <li class="breadcrumb-item"><a href="#">产品管理</a></li>
                    <li class="breadcrumb-item active" aria-current="page">产品分类创建</li>
                </div>
                <div class="right row">
                    <li class="breadcrumb-item"><i class="fa fa-reply"></i></li>
                    <li class="breadcrumb-item active" aria-current="page"><i class="fa fa-refresh"></i> </li>
                </div>
            </nav>
        </div>

        <div class="row">
            <div class="col-md-12 grid-margin stretch-card">
                <div class="card">

                    <form class="forms-sample" action="{{route('admin.config.store')}}" method="post">
                        <div class="card-body">
                            @if ($errors->any())
                                @foreach ($errors->all() as $error)
                                <div class="alert alert-danger">
                                    {{ $error }}
                                </div>
                                @endforeach
                            @endif
                            @if(session()->has("data"))
                                <div class="alert alert-{{session('data')['class']}}">
                                    {{ session('data')['msg'] }}
                                </div>
                            @endif
                                <div class="form-group">
                                    @csrf
                                    <input type="hidden" name="name" value="site">
                                    <input type="hidden" name="title" value="网站配置">
                                    <label for="exampleInputUsername1">网站名称</label>
                                    <input type="text" name="sitetitle" class="form-control" id="sitetitle" value="{{isset($config['sitetitle']) ? $config['sitetitle'] : ''}}" placeholder="请输入网站名称">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">网站域名</label>
                                    <input type="text" name="domain" value="{{isset($config['domain']) ? $config['domain'] : ''}}" class="form-control" id="domain" placeholder="请输入网站域名">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">网站关键字</label>
                                    <input type="text" name="keyword" value="{{isset($config['keyword']) ? $config['keyword'] : ''}}" class="form-control" id="keyword" placeholder="请输入网站关键字">
                                </div>
                                <div class="form-group">
                                    <label for="exampleTextarea1">网站描述</label>
                                    <textarea name="desc" class="form-control" id="desc" rows="4" placeholder="请输入网站描述">{{isset($config['desc']) ? $config['desc'] : ''}}</textarea>
                                </div>
                                <div class="form-group">
                                    <label class="col-form-label">网站状态</label>
                                    <div class="row">
                                        <div class="col-sm-1 col-sm-2 col-sm-4">
                                            <label class="form-radio">
                                                <input type="radio" name="单选">
                                                <span class="inner"></span>
                                                <span class="label">选项1</span>
                                            </label>
                                        </div>
                                        <div class="col-sm-1  col-sm-2 col-sm-4">
                                            <label class="form-radio">
                                                <input type="radio" name="单选">
                                                <span class="inner"></span>
                                                <span class="label">选项1</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="exampleTextarea1">关站提示</label>
                                    <textarea class="form-control" name="closeinfo" id="closeinfo" rows="4" placeholder="请输入关站提示">{{isset($config['closeinfo']) ? $config['closeinfo'] : ''}}</textarea>
                                </div>
                        </div>

                        <div class="card-action">
                            <button class="btn btn-success" type="submit">Submit</button>
                            <button class="btn btn-danger">Cancel</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection
